GBML manual / Rooms

world_remembered

True when the world remembers this thing as done (world_remember() was called for it, or a thing of its kind was destroyed). Ask it in a Create event to show a chest open, a gate unlocked or a lever already pulled when the player walks back.

Syntax

world_remembered() -> bool

Returns

bool

Description

Answers true when the world remembers this thing as done: world_remember was called for it, or a Remembered thing of the same place was destroyed. Ask it in a Create event, so that a chest comes back open, a gate comes back unlocked, a lever comes back pulled.

For a thing that is not a Remembered thing of a world, the answer is always false.

A Remembered thing whose code asks this question is always made again when its part of the world loads, so it can answer. A Remembered thing that never asks is not made again once it is done.

Example

if (world_remembered()) {
    opened = 1;
}

In the chest's Create event: a chest that was opened before starts open.

On the GBA

False for a thing that is not a Remembered thing of a world. A Remembered kind whose code asks this is always made again when its part of the world loads, so it can answer; a kind that never asks is not made again once it is done.

See also: world_rememberWhat a world remembers